package com.haibo.config;

import com.zaxxer.hikari.HikariConfig;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.boot.context.properties.ConfigurationProperties;

import java.util.Map;

/**
 * 数据源属性
 */
@Data
@ConfigurationProperties("spring.datasource")
public class DataSourceProperties {

    private Map<String, DataSourceProp> dynamicSouces;

    @Data
    @EqualsAndHashCode(callSuper = true)
    public static class DataSourceProp extends HikariConfig {

        private boolean primary = false;

    }

}
